package com.itheima.homework.homework06;

//都含有姓名和年龄两个属性，讲课的行为teach
public class Teacher {
    private String name;
    private int age;

    public Teacher() {
    }

    public Teacher(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void teach(){
        System.out.println("老师上课。。。");
    }

    public void show(){
        System.out.println(name+"..." + age);
    }
}

class BaseTeacher extends Teacher{

    public BaseTeacher() {
    }

    public BaseTeacher(String name, int age) {
        super(name, age);
    }
    //基础班老师的teach方法输出【基础班老师讲JavaSE】
    @Override
    public void teach() {
        System.out.println("基础班老师讲JavaSE");
    }
}

class WorkTeacher extends Teacher{
    public WorkTeacher() {
    }

    public WorkTeacher(String name, int age) {
        super(name, age);
    }

    @Override
    public void teach() {
        System.out.println("就业班老师讲JavaEE");
    }
}
